<template>
  <div>
    <div v-html="bookData.bookContent"></div>
  </div>
</template>

<script>
export default {
  name: "bookContent",
  data() {
    return {
      directoryId: "",
      bookData: {}
    };
  },
  created() {
    this.directoryId = this.$route.query.directoryId;
    this.getContent();
  },
  methods: {
    getContent() {
      this.$http({
        url: '/common/book/content',
        data: {
          directoryId: this.directoryId
        }
      }).then(res => {
        this.bookData = res.data;
      });
    }
  }
};
</script>
